import React from 'react';
import { Router as DefaultRouter, Route, Switch } from 'react-router-dom';
import dynamic from 'umi/dynamic';
import renderRoutes from 'umi/_renderRoutes';
import RendererWrapper0 from 'C:/hub/qxxzs_web_new/web-app/src/pages/.umi/LocaleWrapper.jsx'

let Router = require('dva/router').routerRedux.ConnectedRouter;

let routes = [
  {
    "path": "/channeler",
    "component": dynamic({ loader: () => import('../../layouts/ChannelerLayout'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
    "authority": [
      "admin",
      "user",
      "guest",
      "channeler"
    ],
    "routes": [
      {
        "path": "/channeler",
        "redirect": "/channeler/login",
        "exact": true
      },
      {
        "path": "/channeler/login",
        "component": dynamic({ loader: () => import('../Channeler/Login'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
      }
    ]
  },
  {
    "path": "/channelerhome",
    "component": dynamic({ loader: () => import('../../layouts/BasicLayout'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
    "Routes": [require('../Authorized').default],
    "authority": [
      "admin",
      "user",
      "guest",
      "channeler"
    ],
    "routes": [
      {
        "path": "/activity",
        "icon": "sound",
        "name": "activity",
        "routes": [
          {
            "path": "/activity/detail",
            "component": dynamic({ loader: () => import('../Activity/ActivityDetail'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/activity/list",
            "name": "list",
            "component": dynamic({ loader: () => import('../Activity/ActivityList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/activity/addtemplate",
            "name": "addtemplate",
            "component": dynamic({ loader: () => import('../Activity/AddTemplateActivity'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "component": dynamic({ loader: () => import('../404'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
      }
    ]
  },
  {
    "path": "/user",
    "component": dynamic({ loader: () => import('../../layouts/UserLayout'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
    "routes": [
      {
        "path": "/user",
        "redirect": "/user/login",
        "exact": true
      },
      {
        "path": "/user/login",
        "component": dynamic({ loader: () => import('../User/Login'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "path": "/user/register",
        "component": dynamic({ loader: () => import('../User/Register'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "path": "/user/register-result",
        "component": dynamic({ loader: () => import('../User/RegisterResult'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
      }
    ]
  },
  {
    "path": "/handbook",
    "Routes": [require('../Authorized').default],
    "authority": [
      "admin",
      "user",
      "guest"
    ],
    "component": dynamic({ loader: () => import('../../layouts/BlankLayout'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
    "routes": [
      {
        "path": "/handbook/yhsc",
        "component": dynamic({ loader: () => import('../Handbook/Handbook'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
      }
    ]
  },
  {
    "path": "/vip-client",
    "icon": "credit-card",
    "name": "vip",
    "authority": [
      "admin",
      "user",
      "guest"
    ],
    "routes": [
      {
        "path": "/vip-client/servicesTemplate",
        "name": "template",
        "component": dynamic({ loader: () => import('../Vip/VipServiceTempalteList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "path": "/vip-client/addTemplate",
        "name": "addtemplate",
        "component": dynamic({ loader: () => import('../Vip/AddServiceTemplate'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "path": "/vip-client/list",
        "name": "list",
        "component": dynamic({ loader: () => import('../Vip/VipCardList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "path": "/vip-client/add",
        "name": "add",
        "component": dynamic({ loader: () => import('../Vip/AddVipCard'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "path": "/vip-client/cardHistory",
        "name": "history",
        "component": dynamic({ loader: () => import('../Vip/VipCardHistoryList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
      }
    ]
  },
  {
    "path": "/print",
    "name": "print",
    "authority": [
      "admin",
      "user",
      "guest"
    ],
    "routes": [
      {
        "path": "/print/print",
        "name": "print",
        "component": dynamic({ loader: () => import('../Repair/List/RepairInfoToPrint'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
      }
    ]
  },
  {
    "path": "/",
    "component": dynamic({ loader: () => import('../../layouts/BasicLayout'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
    "Routes": [require('../Authorized').default],
    "authority": [
      "admin",
      "user"
    ],
    "routes": [
      {
        "path": "/",
        "redirect": "/dashboard/home",
        "exact": true
      },
      {
        "path": "/dashboard",
        "name": "dashboard",
        "icon": "shop",
        "routes": [
          {
            "path": "/dashboard/home",
            "name": "home",
            "component": dynamic({ loader: () => import('../Dashboard/Home'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/dashboard/analysis",
            "name": "analysis",
            "component": dynamic({ loader: () => import('../Dashboard/Analysis'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/repair",
        "icon": "tool",
        "name": "repair",
        "routes": [
          {
            "path": "/repair/list",
            "name": "repairSearch",
            "component": dynamic({ loader: () => import('../Repair/List/RepairsList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "hideInMenu": true,
            "path": "/repair/print",
            "name": "print",
            "component": dynamic({ loader: () => import('../Repair/List/RepairInfoToPrint'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/contact",
        "icon": "contacts",
        "name": "contact",
        "routes": [
          {
            "path": "/contact",
            "component": dynamic({ loader: () => import('../Contact/ContactList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/contact/contactList",
            "name": "query",
            "component": dynamic({ loader: () => import('../Contact/ContactList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/contact/addOrEdit",
            "name": "addOrEdit",
            "component": dynamic({ loader: () => import('../Contact/AddNewContact'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/inventory",
        "icon": "table",
        "name": "inventory",
        "routes": [
          {
            "path": "/inventory/overview",
            "name": "overview",
            "component": dynamic({ loader: () => import('../Inventory/Overview'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/inventory/supplier",
            "name": "supplier",
            "component": dynamic({ loader: () => import('../Inventory/Supplier'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/inventory/partsCategory",
            "name": "partsCategory",
            "component": dynamic({ loader: () => import('../Inventory/PartsCategory'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/inventory/recordLogs",
            "name": "recordLogs",
            "component": dynamic({ loader: () => import('../Inventory/Logs'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/inventory/warning",
            "name": "storeWarning",
            "component": dynamic({ loader: () => import('../Inventory/Warning'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/activity",
        "icon": "sound",
        "name": "activity",
        "routes": [
          {
            "path": "/activity/detail",
            "component": dynamic({ loader: () => import('../Activity/ActivityDetail'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/activity/list",
            "name": "list",
            "component": dynamic({ loader: () => import('../Activity/ActivityList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/activity/addtemplate",
            "name": "addtemplate",
            "component": dynamic({ loader: () => import('../Activity/AddTemplateActivity'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/news",
        "icon": "sound",
        "authority": [
          "admin"
        ],
        "name": "news",
        "routes": [
          {
            "path": "/news/categorys",
            "name": "category",
            "component": dynamic({ loader: () => import('../News/Category'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/news/addCategory",
            "name": "addcategory",
            "component": dynamic({ loader: () => import('../News/AddCategory'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "hideInMenu": true,
            "exact": true
          },
          {
            "path": "/news/list",
            "name": "list",
            "component": dynamic({ loader: () => import('../News/NewsList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "hideInMenu": true,
            "path": "/news/addtemplate",
            "name": "addtemplate",
            "component": dynamic({ loader: () => import('../News/AddTemplateNews'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/vip",
        "icon": "credit-card",
        "name": "vip",
        "authority": [
          "admin",
          "user",
          "guest"
        ],
        "routes": [
          {
            "path": "/vip/servicesTemplate",
            "name": "template",
            "component": dynamic({ loader: () => import('../Vip/VipServiceTempalteList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "hideInMenu": true,
            "path": "/vip/addTemplate",
            "name": "addtemplate",
            "component": dynamic({ loader: () => import('../Vip/AddServiceTemplate'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "path": "/vip/list",
            "name": "list",
            "component": dynamic({ loader: () => import('../Vip/VipCardList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "hideInMenu": true,
            "path": "/vip/add",
            "name": "add",
            "component": dynamic({ loader: () => import('../Vip/AddVipCard'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "hideInMenu": true,
            "path": "/vip/cardHistory",
            "name": "history",
            "component": dynamic({ loader: () => import('../Vip/VipCardHistoryList'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/sms",
        "icon": "message",
        "name": "sms",
        "authority": [
          "admin",
          "user",
          "guest"
        ],
        "routes": [
          {
            "path": "/sms/history",
            "name": "history",
            "component": dynamic({ loader: () => import('../Sms/History'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
            "exact": true
          },
          {
            "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
          }
        ]
      },
      {
        "path": "/backup",
        "icon": "copy",
        "name": "backup",
        "authority": [
          "admin",
          "user",
          "guest"
        ],
        "component": dynamic({ loader: () => import('../Backup/index'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": dynamic({ loader: () => import('../404'), loading: require('C:/hub/qxxzs_web_new/web-app/src/components/PageLoading/index').default }),
        "exact": true
      },
      {
        "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
      }
    ]
  },
  {
    "component": () => React.createElement(require('C:/hub/qxxzs_web_new/web-app/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: true })
  }
];
window.g_plugins.applyForEach('patchRoutes', { initialValue: routes });

export default function() {
  return (
<RendererWrapper0>
          <Router history={window.g_history}>
      { renderRoutes(routes, {}) }
    </Router>
        </RendererWrapper0>
  );
}
